const install = (Vue, vm) => {
	let getLogo = (params = {}) => vm.$u.get('/ntka/ka/logo/getByType/1')

	let getBackgroundImage = (params = {}) => vm.$u.get('/ntka/ka/logo/getByType/2')

	let login = (params = {}) => vm.$u.post('/ntka/sys/login2', params)

	let getMenu = (params = {}) => vm.$u.get('/ntka/ka/org/queryOrgTree', params)

	// 掘进工作面_动作主板数据-根据工作面id查询
	let getMainboardActionData = (params = {}) => vm.$u.get('/ntka/ka/jjgzmDzzbsj/' + params.id)

	//掘进工作面_实时报警-根据工作面id查询
	let getAlarmInfo = (params = {}) => vm.$u.get('/ntka/ka/jjgzmSsbj/' + params.id)

	//掘进工作面_掘进机状态-根据工作面id查询
	let getDeviceState = (params = {}) => vm.$u.get('/ntka/ka/jjgzmJjjzt/' + params.id)

	// 掘进工作面_数据板-根据工作面id查询
	let getDeviceDataBoard = (params = {}) => vm.$u.get('/ntka/ka/jjgzmSjb/' + params.id)

	// 掘进工作面_环境参数-根据工作面id查询
	let getEnviromentData = (params = {}) => vm.$u.get('/ntka/ka/jjgzmHjcs/' + params.id)

	// 掘进工作面_系统其他-根据工作面id查询
	let getSystemExt = (params = {}) => vm.$u.get('/ntka/ka/jjgzmXtqt/' + params.id)

	// 掘进工作面_视频登记表-根据工作面id查询
	let getVideoInfo = (params = {}) => vm.$u.get('/ntka/ka/jjgzmSpdj/' + params.id)

	// 掘进工作面_设备通讯状态-根据工作面id查询
	let getDeviceCommunicationStatus = (params = {}) => vm.$u.get('/ntka/ka/jjgzmSbtxzt/' + params.id)

	//掘进工作面_进尺数据-根据工作面id查询
	let getRuleData = (params = {}) => vm.$u.get('/ntka/ka/jjgzmJcsj/' + params.id)

	//掘进工作面注册表-通过id查询
	let getWorkingFaceRegistTable = (params = {}) => vm.$u.get('/ntka/ka/jjgzmZcb/queryById', params)

	//获取某个掘进工作面现场的视频设备列表
	let getVideoList = (params = {}) => vm.$u.get('/server.html?par1=get_video_list&par2=' + params
		.deviceId)

	//请求开始=某路视频的直播流视频Id
	let startVideo = (params = {}) => vm.$u.get('/server.html?par1=query_video_start&par2=' +
		params
		.videoId)

	//请求开始=某路视频的直播流视频Id
	let sendVideoHeartBeat = (params = {}) => vm.$u.get('/server.html?par1=heartbeat_video&par2=' +
		params.videoId)

	//请求开始=某路视频的直播流视频Id
	let stopVideo = (params = {}) => vm.$u.get('/server.html?par1=query_video_stop&par2=' + params
		.videoId)

	//按类型批量历史数据请求
	let queryHisDataList = (params = {}) => vm.$u.get(
		'/server.html?par1=query_his_data_1&par2=' + params.deviceId + "&par3=" + params.reqType + "&par4=" +
		params.startTime + "&par5=" + params.duration)

	//请求模拟量变量列表
	let querySemulationVariableList = (params = {}) => vm.$u.get('/server.html?par1=query_his_data_2&par2=' + params
		.deviceId)

	//请求模拟量变量列表
	let querySemulationVariableHisDataList = (params = {}) => vm.$u.get(
		'/server.html?par1=query_his_data_3&par2=' + params.deviceId + '&par3=' + params.variableName +
		'&par4=' + params.startTime + '&par5=' + params.duration)

	vm.$u.api = {
		getLogo,
		getBackgroundImage,

		login,
		getMenu,

		getMainboardActionData,
		getAlarmInfo,
		getDeviceState,
		getDeviceDataBoard,
		getEnviromentData,
		getSystemExt,
		getVideoInfo,
		getDeviceCommunicationStatus,
		getRuleData,
		getWorkingFaceRegistTable,

		getVideoList,
		startVideo,
		sendVideoHeartBeat,
		stopVideo,
		queryHisDataList,
		querySemulationVariableList,
		querySemulationVariableHisDataList
	}
}

export default {
	install
}
